<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" type="image/x-icon" href="${pageContext.request.contextPath}/image/favicon.ico" />
<title>克里斯笔记-删除多余图片</title>
<script src="${pageContext.request.contextPath}/js/jquery-3.5.0.min.js"></script>	
<script>
	$(function()
	{
		var imgSrc="";
		$(".recordDiv img").each(function()
		{
			imgSrc+=$(this).attr("src");
			imgSrc+=",";
		});
		$.ajax(
		{
			url:"${pageContext.request.contextPath}/deleteExtraImg?imgSrc="+imgSrc
		});
		alert("删除成功！");
		location.href="${pageContext.request.contextPath}/manage";
	});
</script>
</head>
<body>
	<c:forEach var="record" items="${records}">
		<div class="recordDiv" style="display:none">
			${record.recordContent}
		</div>
	</c:forEach>
</body>
</html>